2382 some incorrect usage related to the recent shell=false issue #2417
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Attempt to implement a shell=False model that hopefully will properly address running on different platform without "fine not found" issues like some users had reported in the past.
When shell=False, we should use a sequence instead of a string. This is because it behaves differently on different platforms, and using a sequence should work on both Windows and Linux.
https://stackoverflow.com/a/30830867/8706033
For a complete explanation, please refer to the python documentation:
https://docs.python.org/3/library/subprocess.html#popen-constructor
I have extracted the key points as follows:
args should be a sequence of program arguments or else a single string or path-like object. By default, the program to execute is the first item in args if args is a sequence. If args is a string, the interpretation is platform-dependent and described below. See the shell and executable arguments for additional differences from the default behavior.
Unless otherwise stated, it is recommended to pass args as a sequence.
On POSIX, if args is a string, the string is interpreted as the name or path of the program to execute.
However, this can only be done if not passing arguments to the program.
On Windows, if args is a sequence, it will be converted to a string in a manner described in Converting an argument sequence to a string on Windows. This is because the underlying CreateProcess() operates on strings.